<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			// 检查登录状态，如果未登录则跳转至登录页面
			const token = uni.getStorageSync('token')
			if (!token) {
				setTimeout(() => {
					uni.redirectTo({
						url: '/subpages/login/index'
					})
				}, 100)
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
